#include"randgen.h"
#include<random>
HaltonGenerator::HaltonGenerator(long long seed) :haltonDim(0), seed(seed) {}
void HaltonGenerator::setSeeds(long long *_seed) { seed = *_seed; }
Float HaltonGenerator::genRand() 
{ 
	haltonDim = haltonDim > 998 ? 0 : haltonDim + 1;
	return halton(haltonDim, seed); 
	//return (Float)rand() / RAND_MAX;
}

DefaultRandGenerator::DefaultRandGenerator(long long seed) {srand(seed); }
void DefaultRandGenerator::setSeeds(long long *_seed) { srand(*_seed); }
Float DefaultRandGenerator::genRand()
{
	return (Float)rand() / RAND_MAX;
}